<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html>
<html>
<head>
    <title>发布新话题</title>
    <link rel="stylesheet" href="${ctxPath}/font-awesome/css/font-awesome.min.css">
    <link rel="stylesheet" href="${ctxPath}/bootstrap/css/bootstrap.min.css">
    <link rel="stylesheet" href="${ctxPath}/simditor/styles/simditor.css">
    <link rel="stylesheet" href="${ctxPath}/css/common.css">
    <link rel="stylesheet" href="${ctxPath}/css/topic.css">
</head>
<body>

<jsp:include page="/WEB-INF/pages/commons/header.jsp"></jsp:include>

<%--面包屑导航条--%>
<nav class="publish">
    <a href="${ctxPath}/index.jsp">首页</a>
    <i>/</i>
    <b>更改话题</b>
</nav>

<p class="message">${message_topic}</p>

<%--当前页面主要内容--%>
<main class="editor-container">

    <form action="${ctxPath}/topic/update?id=${topic.id}" method="post">
        <p class="topic-title">
            <input type="text" name="title" value="${topic.title}" placeholder="请输入标题">
        </p>
        <textarea name="content" id="editor">${topic.content}</textarea>
        <%--在Bootstrap中.row表示一"行"--%>
        <div class="row buttons">
            <%--在Bootstrap中.col-N表示一"行"中的"列"--%>
                <span class="col-12 offset-0 row justify-content-end">
                <select class="form-select col-3 " aria-label="Default select example" name="tag">
                    <option selected>请选择你的标签</option>
                    <option value="1">java</option>
                    <option value="2">js</option>
                    <option value="3">html</option>
                    <option value="4">css</option>
                    <option value="5">sql</option>
                    <option value="6">网络</option>
                    <option value="7">计算机组成原理</option>
                    <option value="8">c语言</option>
                    <option value="9">c++</option>
                    <option value="10">python</option>
                </select>
                <button type="reset" class="col-2 offset-4" >重置</button>
                <button type="submit" class="col-2 offset-0">发布</button>
            </span>
        </div>
    </form>

</main>

<c:remove var="message" scope="session" />
<c:remove var="title" scope="session" />
<c:remove var="content" scope="session" />

<script type="text/javascript" src="${ctxPath}/simditor/scripts/jquery.min.js"></script>
<script type="text/javascript" src="${ctxPath}/simditor/scripts/module.js"></script>
<script type="text/javascript" src="${ctxPath}/simditor/scripts/uploader.js"></script>
<script type="text/javascript" src="${ctxPath}/simditor/scripts/hotkeys.js"></script>
<script type="text/javascript" src="${ctxPath}/simditor/scripts/dompurify.js"></script>
<script type="text/javascript" src="${ctxPath}/simditor/scripts/simditor.js"></script>
<script type="text/javascript" src="${ctxPath}/js/editor.js"></script>

<jsp:include page="/WEB-INF/pages/commons/footer.jsp"></jsp:include>

</body>
</html>
